package com.zmn.oms.persistence.interfaces.changerecord;

import com.zmn.oms.model.entity.changerecord.OrderChangeRecord;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 类描述：订单修改记录持久层
 *
 * @author xiewenbing
 * @date 2019-11-26 10:20
 */

public interface OrderChangeRecordDao {

    /**
     * 根据订单id查找订单修改记录
     *
     * @param orderId
     * @return OrderChangeRecord
     */
    OrderChangeRecord findOrderChangeRecordByKey(Long orderId);

    /**
     * 根据订单Id集合查询
     *
     * @param orderIdList
     * @return
     */
    List<OrderChangeRecord> listByOrderIdList(@Param("orderIdList") List<Long> orderIdList);

    /**
     * 更新订单修改记录
     *
     * @param orderChangeRecord
     * @return int
     */
    int updateOrderWorkChangeRecord(OrderChangeRecord orderChangeRecord);

    /**
     * 添加订单修改记录
     *
     * @param orderChangeRecord
     * @return int
     */
    int insertOrderWorkChangeRecord(OrderChangeRecord orderChangeRecord);

    /**
     * 删除订单修改记录
     *
     * @param orderId
     * @return int
     */
    int deleteOrderWorkChangeRecordByKey(Long orderId);

    /**
     * 更新订单第一次预约时间修改记录
     *
     * @param orderChangeRecord
     * @return int
     */
    int updateOrderFirstDutyTimeChangeRecord(OrderChangeRecord orderChangeRecord);

    /**
     * 更新订单最后一次预约时间修改记录
     *
     * @param orderChangeRecord
     * @return int
     */
    int updateOrderLastDutyTimeChangeRecord(OrderChangeRecord orderChangeRecord);

    /**
     * 更新订单第一次派单修改记录
     *
     * @param orderChangeRecord
     * @return int
     */
    int updateOrderFirstDistributeChangeRecord(OrderChangeRecord orderChangeRecord);

    /**
     * 更新订单最后一次派单修改记录
     *
     * @param orderChangeRecord
     * @return int
     */
    int updateOrderLastDistributeChangeRecord(OrderChangeRecord orderChangeRecord);

    /**
     * 修改上门扫码关注时间
     *
     * @param orderChangeRecord
     */
    void updateOrderVisitScanTimeChangeRecord(OrderChangeRecord orderChangeRecord);

    /**
     * 清空上门扫码信息
     *
     * @param orderChangeRecord
     */
    void clearOrderVisitScanTimeChangeRecord(OrderChangeRecord orderChangeRecord);

    /**
     * 修改工程师形象照时间
     *
     * @param orderChangeRecord
     */
    void updateOrderMasterImageTimeChangeRecord(OrderChangeRecord orderChangeRecord);

    /**
     * 修改预付记录
     *
     * @param orderChangeRecord
     */
    void updateOrderPrepayAmountChangeRecord(OrderChangeRecord orderChangeRecord);

    /**
     * 修改预约时间次数
     *
     * @param orderChangeRecord
     */
    void updateDutyTimeModifyCount(OrderChangeRecord orderChangeRecord);

    /**
     * 修改责任工程师
     *
     * @param orderChangeRecord
     */
    void updateLiableMasterRecord(OrderChangeRecord orderChangeRecord);

    /**
     * 修改订单取消责任工程师
     *
     * @param orderChangeRecord
     */
    void updateCancelLiableMasterRecord(OrderChangeRecord orderChangeRecord);

    /**
     * 修改订单取消责任工程师
     *
     * @param orderChangeRecord
     */
    void clearCancelLiableAndLiableMasterRecord(OrderChangeRecord orderChangeRecord);

    /**
     * 修改订单取消责任和责任工程师
     * @param orderChangeRecord
     */
    void updateCancelLiableAndLiableMasterRecord(OrderChangeRecord orderChangeRecord);

    /**
     * 修改订单服务分类
     * @param orderChangeRecord
     */
    void updateServCategRecord(OrderChangeRecord orderChangeRecord);
}